package com.pd.dubbo;

import com.pd.dubbo.dubbo_consume.reference.RefService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class DubboConsumeApplication {

    @Autowired
    private RefService refService;

    public static void main(String[] args) {
        System.out.println("<<<<<<<<<<<<<<<<<====DUBBO CONSUME START====>>>>>>>>>>>>>>");
        SpringApplication.run(DubboConsumeApplication.class, args);
        System.out.println("<<<<<<<<<<<<<<<<<====DUBBO CONSUME END====>>>>>>>>>>>>>>");
    }
    @RequestMapping("/say")
    public String sayHello(String name) {
        return refService.sayHello(name);
    }

}
